package shared.other;

import backend.model.admin.Foreman;
import com.google.common.base.Predicate;

public class Predicates {

    public static ActiveForemanPredicate createActiveForemanPredicate() {
        return new ActiveForemanPredicate();
    }

    private static class ActiveForemanPredicate implements Predicate<Foreman> {
        @Override
        public boolean apply(Foreman foreman) {
            return (foreman.getEmployee() !=null) && (foreman.getEmployee().getIsActive());
        }
    }
}
